package cn.edu.xmut.fourth;

public class Factory {
    public IPerson getPerson (String type){
        if(type.equalsIgnoreCase("chn")){
            return new Chinese();
        }else {
            return new American();
        }
    }
}
